import TinyReact from '../src';

const root = document.getElementById('root');

class DemoRef extends TinyReact.Component {
  handle() {
    let value = this.input.value;
    console.log(value);
  }
  render() {
    return (
      <div>
        <input type="text" ref={(input) => (this.input = input)} />
        <button onClick={this.handle.bind(this)}>按钮</button>
      </div>
    );
  }
}

TinyReact.render(<DemoRef />, root);
